package org.leetcode;

public class BiggestDivider {

    public int calcBiggestDivider(int a , int b){
       if (a > b){
           int c = a - b;
           return calcBiggestDivider(c, b);
       }else if ( b > a){
           int c = b -a;
           if (c == a ){
               return c;
           }else{
               return calcBiggestDivider(c, a);
           }
       }
       else{
           return a;
       }
    }
}
